import { getMyInformation } from '@/api/MyselfApi'
import { useMyInformationPinia } from '@/stores/models/useMyInformation'

// myInfromationPinia.myInformation是存数据的地方
const myInformationPinia = useMyInformationPinia()

// 每次个人数据改动后就调用他
const xuanRanInformation = async () =>{
  // console.log('111myInformationPinia.myInformation.value',myInformationPinia.myInformation.value)
  const res = await getMyInformation()
  console.log('res',res)
  const obj = myInformationPinia.updateMyInformation(res)
  console.log('个人信息更新，获取到个人信息的结果',obj)
  return obj
}

export default xuanRanInformation